﻿/*-----------------------------------------------
// File: HeroFragIconTemplate.cs
// Description: 
// Author: Shaobing	492057342@qq.com
-----------------------------------------------*/
using UnityEngine;
using System.Collections;

namespace UI
{
    public class HeroFragIconTemplate : HeroIconTemplate 
    {
        public UILabel numLabel;
        public void SetHeroFrag(string id, int num)
        {
            var df = Dict.Blo.DictFragBlo.GetTableFrag(id);
            SetHero(df.target);
            numLabel.text = num.ToString();
        }
        public override void SetIconBGAndFrameByQuality(QualityValue quality)
        {
            switch (quality)
            {
                case QualityValue.WHITE:
                    {
                        iconBg.spriteName = "UI_kuang_big_di_white";
                        iconFrame.spriteName = "UI_kuang_sui_white";
                    }
                    break;
                case QualityValue.GREEN:
                    {
                        iconBg.spriteName = "UI_kuang_big_di_green";
                        iconFrame.spriteName = "UI_kuang_sui_green";
                    }
                    break;
                case QualityValue.BLUE:
                    {
                        iconBg.spriteName = "UI_kuang_big_di_blue";
                        iconFrame.spriteName = "UI_kuang_sui_blue";
                    }
                    break;
                case QualityValue.PURPLE:
                    {
                        iconBg.spriteName = "UI_kuang_big_di_zi";
                        iconFrame.spriteName = "UI_kuang_sui_zi";
                    }
                    break;
                case QualityValue.YELLOW:
                    {
                        iconBg.spriteName = "UI_kuang_big_di_yellow";
                        iconFrame.spriteName = "UI_kuang_sui_yellow";
                    }
                    break;
                case QualityValue.RED:
                    {
                        iconBg.spriteName = "UI_kuang_big_di_red";
                        iconFrame.spriteName = "UI_kuang_sui_red";
                    }
                    break;
                default:
                    {
                        iconBg.spriteName = "UI_kuang_big_di_white";
                        iconFrame.spriteName = "UI_kuang_sui_white";
                    }
                    break;
            }
        }
    }
}
